﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyBBS.Data.Models;

namespace MyBBS.Data.Filters
{
    public static class KickFilter
    {
        public static int CountKick(this IQueryable<Kick> kicks, long postID)
        {
            var counts = from k in kicks
                         where k.PostID == postID
                         select k;

            return counts.Count();                          
                    
        }

        public static IQueryable<Kick> WithPostIDEquals(this IQueryable<Kick> kicks, long postID)
        {
            return from k in kicks
                   where k.PostID == postID
                   select k;

        }
    }
}
